<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Comment
 *
 * @author shenlon
 */
class Comment {

    private $author;
    private $content;
    private $date;
    private $rate;

    public function remove() {
        
    }

    public function displayCommentsForProduct() {
        
    }

    public function addComment($author, $rate, $content) {
        
    }

    public static function listCommentsForProduct($product) {
        
    }

    public function __set($key, $value) {
        if (!property_exists($this, $key))
            throw new Exception("Key $key does not exist in class " . __CLASS__);
        $this->$key = $value;
    }

    public function __get($key) {
        if (!property_exists($this, $key))
            throw new Exception("Key $key does not exist in class " . __CLASS__);
        return $this->$key;
    }

}

?>
